package spring.j2024_11_16_2.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import spring.j2024_11_16_2.model.UserInfo;


@Configuration
public class UserConfig {

    @Bean({"u" , "uu" , "uuu"})
    public UserInfo userInfo1(){

        UserInfo userInfo1 = new UserInfo();
        userInfo1.setId(1);
        userInfo1.setName("zhangsan");
        userInfo1.setLen(2);
        return userInfo1 ;
    }

    @Bean("u2")
    public  UserInfo userInfo2(){
        UserInfo userInfo2 = new UserInfo();
        userInfo2.setId(2);
        userInfo2.setName("lisi");
        userInfo2.setLen(3);
        return userInfo2 ;
    }



}
